package com.mocha.bss.feign.bo.menu;

import lombok.*;

import java.io.Serializable;

/**
 * 具体功能点；
 * eg. 修改； 删除， 搜索等；
 *
 * @author: songkui
 * @since: 2023/3/20 14:27
 */
@Setter
@Getter
@EqualsAndHashCode(of = {"code"})
@NoArgsConstructor
@AllArgsConstructor
public class FunctionVO implements Serializable {

    private String code; //页面 功能 code
    private String title; // 功能名称

    public static FunctionVO boToVo(FunctionBO bo) {
        return new FunctionVO(bo.getFuncCode(), bo.getFuncTitle());
    }

    public static FunctionVO subToVo(SubMenuBO bo) {
        return new FunctionVO(bo.getCode(), bo.getTitle());
    }
    public static FunctionVO mainToVo(MainMenuBO bo) {
        return new FunctionVO(bo.getCode(), bo.getTitle());
    }

}
